package com.bestom.communication;

import android.app.Application;

import com.bestom.communication.constants.FilesConstant;
import com.bestom.communication.utils.SharedPreferencesUtil;

public class ThisApplication extends Application {

    private static ThisApplication application;
    private int mTime;

    @Override
    public void onCreate() {
        super.onCreate();
        application = this;
        // SharedPreferences初始化
        SharedPreferencesUtil.init(this);
        mTime = Integer.parseInt((String) SharedPreferencesUtil.getInstance().getValue(FilesConstant.mTimePref,FilesConstant.mDefaultTime));
    }

    public int getTime() {
        return 1;
    }

    public void setTime(int time){
        mTime = time;
    }

    public static synchronized ThisApplication getApplication() {
        return application;
    }

}